import Vue from 'vue'
import App from './App'
import store from './store'
import filters from './util/filters/index.js'
import api from './util/api.js'
import comMethods from './util/plugins/common.js'

import uView from "uview-ui";
Vue.use(uView);

Vue.config.productionTip = false
// #ifdef APP-PLUS
if (plus.os.name == 'Android') {
	const KEEP_ALIVE = uni.requireNativePlugin("KeepAliveModule");
	Vue.prototype.$keepAlive = KEEP_ALIVE;
}
// #endif 
// 把全局js挂载到vue原型上
Vue.prototype.$api = api
Vue.prototype.$comMethods = comMethods

// 注册过滤器
Object.keys(filters).forEach(v => {
	Vue.filter(v, filters[v])
});

App.mpType = 'app'

const app = new Vue({
	store,
    ...App
})
app.$mount()
